export function deleteCookie(name) {
  if (process.env.BROWSER) {
    sessionStorage.removeItem(name)
  }
}
export function writeCookie(c_name,value,expiredays){
  if (process.env.BROWSER) {
    sessionStorage.setItem(c_name, value);
  }
}

export function getCookie(c_name) {
  if (process.env.BROWSER) {
    return sessionStorage.getItem(c_name);
  }
}

export function getToken(){
  return getCookie('token');
}

export function removeToken(){
  deleteCookie('token')
}
